$OpenBSD: patch-lib_src_util_posix_dynamic_library_cc,v 1.2 2015/07/10 21:02:48 jasper Exp $

From 858e51a39948a383e0e651d0ca6d3fc1b17edf41 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Wed, 1 Jul 2015 11:24:16 +0200
Subject: [PATCH] (FACT-891) Extend check to unbreak compilation on OpenBSD

--- lib/src/util/posix/dynamic_library.cc.orig	Fri Jun 26 01:47:38 2015
+++ lib/src/util/posix/dynamic_library.cc	Tue Jun 30 11:04:35 2015
@@ -41,7 +41,11 @@ namespace facter { namespace util {
         close();
 
         // Don't actually perform a load to determine if it is already loaded
+#if defined(RTLD_NOLOAD)
         _handle = dlopen(name.c_str(), RTLD_LAZY | RTLD_NOLOAD);
+#else
+        _handle = dlopen(name.c_str(), RTLD_LAZY);
+#endif
         if (!_handle) {
             // Load now
             _handle = dlopen(name.c_str(), RTLD_LAZY);
